$(function () {
  'use strict';
  var pictureId = 0;
  var options = {
    // inline: true,
    url: 'data-original',
    ready: function (e) {
      $('.viewer-download-btn').on('click', function () {//下载
        downPicture(pictureId)
      });
      $('.viewer-favorite-btn').on('click', function () {//收藏
        favorites(pictureId, 4, this)
      })
    },
    show: null,
    shown: null,
    hide: null,
    hidden: null,
    view: null,
    viewed: function (e) {
      pictureId = e.detail.originalImage.getAttribute('data-id');
      title = e.detail.originalImage.alt;
    },
    filter: function (e) {
      return $(e).hasClass("viewer");
    }
  };
  $('.docs-pictures').viewer(options);
});
